
function reg(name){
    this.Action = "REG"
    this.name = name
}

function hbeat(name){
    this.Action = "HBEAT"
    this.name = name
}

function reqLink(id, port){
    this.Action = "REQLINK",
    this.id = id;
    this.port = port;
}

function respLink(id, name, port){
    this.Action = "RESPLINK",
    this.id = id;
    this.name = name;
    this.port = port;
}

function respConfirm(id, port){
    this.Action = "RESPCONFIRM",
    this.id = id;
    this.port = port;
}


module.exports = {
    REG: reg,
    HBEAT: hbeat,
    REQLINK:reqLink,
    RESPLINK:respLink,
    RESPCONFIRM: respConfirm,
    REG_STR:'REG',
    HBEAT_STR:'HBEAT',
    REQLINK_STR:'REQLINK',
    RESPCONFIRM_STR:'RESPCONFIRM',
    RESPLINK_STR:'RESPLINK'
}